
#ifndef SQLDataType_HEADER_H
#define SQLDataType_HEADER_H

#include <string>
#include <list>

#include "SQLObject.h"
#include "SQLExpr.h"
#include "../../utils/Types.h"
#include "../../DbType.h"

class SQLDataType : virtual public SQLObject
{
public:
  virtual string_ptr getName() = 0;

  virtual long nameHashCode64() = 0;
  virtual void setName(string_ptr name) = 0;

  virtual SQLExpr_list_ptr getArguments() = 0;

  virtual ~SQLDataType()
  {
  }

  virtual int jdbcType() = 0;
  virtual SQLObject_ptr clone() = 0;
  virtual BOOL_ptr hasKeyLength() = 0;

  virtual BOOL_ptr getWithTimeZone() = 0;

  virtual void setWithTimeZone(BOOL_ptr value) = 0;

  virtual BOOL_ptr isWithLocalTimeZone() = 0;

  virtual void setWithLocalTimeZone(BOOL_ptr value) = 0;

  virtual void setDbType(DbType_ptr dbType) = 0;

  virtual DbType_ptr getDbType() = 0;

  virtual BOOL_ptr isInt() = 0;

  virtual BOOL_ptr isNumberic() = 0;

  virtual BOOL_ptr isString() = 0;

  class Constants
  {
  public:
    static string_ptr CHAR;
    static string_ptr NCHAR;
    static string_ptr VARCHAR;
    static string_ptr VARBINARY;
    static string_ptr DATE;
    static string_ptr TIMESTAMP;
    static string_ptr XML;

    static string_ptr DECIMAL;
    static string_ptr NUMBER;
    static string_ptr REAL;
    static string_ptr DOUBLE_PRECISION;
    static string_ptr DOUBLE;

    static string_ptr TINYINT;
    static string_ptr SMALLINT;
    static string_ptr INT;
    static string_ptr BIGINT;
    static string_ptr TEXT;
    static string_ptr BYTEA;
    static string_ptr BOOLEAN;

    static string_ptr FLOAT;
  };
};
// typedef boost::shared_ptr<SQLDataType> SQLDataType_ptr;

#endif
